<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>PostgreSQL Functions (PDO_PGSQL)</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="ref.pdo-odbc.connection.html">« PDO_ODBC DSN</a></li>
      <li style="float: right;"><a href="ref.pdo-pgsql.connection.html">PDO_PGSQL DSN »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="pdo.drivers.html">PDO 驱动</a></li>
    <li>PostgreSQL Functions (PDO_PGSQL)</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="ref.pdo-pgsql" class="reference">
  
  <h1 class="title">PostgreSQL Functions (PDO_PGSQL)</h1>
  
  <div class="partintro">

   <div class="section" id="pdo-pgsql.intro">
   <h2 class="title">简介</h2>
    <p class="para">
     PDO_PGSQL is a driver that implements the <a href="intro.pdo.html" class="link">PHP
     Data Objects (PDO) interface</a>
     to enable access from PHP to PostgreSQL databases.
    </p>
   </div>

   <div class="section" id="pdo-pgsql.resources">
    <h2 class="title">资源类型 </h2>
    <p class="para">
     This extension defines a stream resource returned by
     <span class="function"><a href="pdo.pgsqllobopen.html" class="function">PDO::pgsqlLOBOpen()</a></span>.
    </p>
   </div>

   

<div class="section" id="ref.pdo-pgsql.installation">
 <h2 class="title">安装</h2>
 <p class="para">
  Use <strong class="option configure">--with-pdo-pgsql[=DIR]</strong> to install
  the PDO PostgreSQL extension, where the optional <code class="literal">[=DIR]</code>
  is the PostgreSQL base install directory, or the path to <em class="emphasis">pg_config</em>.
  <div class="example-contents screen">
<div class="cdata"><pre>
$ ./configure --with-pdo-pgsql
</pre></div>
  </div>
 </p>
</div>



   

<div class="section" id="pdo-pgsql.constants">
 <h2 class="title">预定义常量</h2>
 <p class="simpara">下列常量由此驱动定义，且仅在扩展编译入 PHP
或在运行时动态载入时可用。另外，使用此驱动时，仅会使用这些驱动特定的常量。使用其他驱动的驱动特定的常量可能会导致不可预见的情况。如果代码可运行于多个驱动，<span class="function"><a href="pdo.getattribute.html" class="function">PDO::getAttribute()</a></span>
可被用于获取
<strong><code>PDO_ATTR_DRIVER_NAME</code></strong>
属性以检查驱动。</p>
 <dl>
  
  
   <dt id="pdo.constants.pgsql-attr-disable-prepares">
    <strong><code>PDO::PGSQL_ATTR_DISABLE_PREPARES</code></strong>
     (<span class="type">int</span>)
   </dt>

   <dd>

    <p class="para">
     Send the query and the parameters to the server together in a single
     call, avoiding the need to create a named prepared statement separately.
     If the query is only going to be executed once this can reduce latency by
     avoiding an unnecessary server round-trip.
    </p>
   </dd>

  
  
 </dl>

</div>





   <div class="section" id="pdo-pgsql.general-notes">
    <h2 class="title">General notes</h2>
    <blockquote class="note"><p><strong class="note">注意</strong>: 
     <p class="para">
      <code class="literal">bytea</code> fields are returned as streams.
     </p>
    </p></blockquote>
   </div>

  </div>

  

  

























































 <h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="ref.pdo-pgsql.connection.html">PDO_PGSQL DSN</a> — Connecting to PostgreSQL databases</li><li><a href="pdo.pgsqlcopyfromarray.html">PDO::pgsqlCopyFromArray</a> — Copy data from PHP array into table</li><li><a href="pdo.pgsqlcopyfromfile.html">PDO::pgsqlCopyFromFile</a> — Copy data from file into table</li><li><a href="pdo.pgsqlcopytoarray.html">PDO::pgsqlCopyToArray</a> — Copy data from database table into PHP array</li><li><a href="pdo.pgsqlcopytofile.html">PDO::pgsqlCopyToFile</a> — Copy data from table into file</li><li><a href="pdo.pgsqlgetnotify.html">PDO::pgsqlGetNotify</a> — Get asynchronous notification</li><li><a href="pdo.pgsqlgetpid.html">PDO::pgsqlGetPid</a> — Get the server PID</li><li><a href="pdo.pgsqllobcreate.html">PDO::pgsqlLOBCreate</a> — Creates a new large object</li><li><a href="pdo.pgsqllobopen.html">PDO::pgsqlLOBOpen</a> — Opens an existing large object stream</li><li><a href="pdo.pgsqllobunlink.html">PDO::pgsqlLOBUnlink</a> — Deletes the large object</li></ul>
</div>
</div></div></body></html>